#pragma once

#include <string>

#include <Pub\Json\CSContentJsonDictionary.h>

class JSONConfig
{
private:
	std::string strFileName;
	gameEx::CSJsonDictionary* pJsonDict;
	CSJson::Value m_vDefaultValue;

public:
    JSONConfig();
	bool TheBegin_File(const char* filename);
	bool TheBegin_Description(const char* szData);
	void TheEnd();
	std::string GetDescription();

	int  GetItemIntValue(std::string strKey, int nDefaultValue, int nIndex);
	bool GetItemStringValue(std::string strKey, std::string &strRetValue, int nIndex);

	bool  SetItemIntValue(std::string strKey, int nValue, int nIndex);
	bool  SetItemStringValue(std::string strKey, std::string strValue, int nIndex);
};